package Task10;

import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            String string = scanner.nextLine();
            int num1 = 0;
            int num2 = getlen(string);
            int num3 = getchar(string);
            int num4 = getnum(string);
            int num5 =getsymbol(string);
            if(num3 > 10 && num4 > 0 && num5 > 0){
                num1 = num2 + num3 +num4 +num5 + 5;
            } else if (num3 < 20 && num4 > 0 && num5 > 0) {
                num1 = num2 + num3 +num4 +num5 + 3;
            } else if (num3 > 0 && num4 > 0 && num5 == 0) {
                num1 = num2 + num3 +num4 +num5 + 2;
            }else {
                num1 = num2 + num3 +num4 +num5;
            }
            if (num1 >= 90 ){
                System.out.println("VERY_SECURE");
            } else if (num1 >= 80) {
                System.out.println("SECURE");
            } else if (num1 >= 70) {
                System.out.println("VERY_STRONG");
            } else if (num1 >= 60) {
                System.out.println("STRONG");
            } else if (num1 >= 50) {
                System.out.println("AVERAGE");
            }else if(num1 >= 25){
                System.out.println("WEAK");
            }else if(num1 >= 0){
                System.out.println("VERY_WEAK");
            }
        }
    }
    public static int getlen(String string){
        if (string.length() <= 4){
            return 5;
        } else if (string.length() >= 5 && string.length() <= 7) {
            return 10;
        }else if(string.length() >= 8){
            return 25;
        }else {
            return 0;
        }
    }
    public static int getchar(String string){
        int small = 0;
        int big = 0;
        for (int i = 0; i < string.length(); i++) {
            char ch = string.charAt(i);
            if(ch >= 65 && ch <= 90  ){
                big++;
            } else if (ch >= 97 && ch <= 122) {
                small++;
            }
        }
        if(big > 0 && small > 0){
            return 20;
        } else if (big > 0 || small > 0) {
            return 10;
        }else {
            return 0;
        }
    }
    public static int getnum(String string){
        int count = 0;
        for (int i = 0; i <string.length(); i++) {
            char ch = string.charAt(i);
            if(ch - '0' >= 0 && ch - '0' <= 9){
                count++;
            }
        }
        if(count == 1){
            return 10;
        } else if (count > 1) {
            return 20;
        }else {
            return 0;
        }
    }
    public static int getsymbol(String string){
        int count = 0;
        for (int i = 0; i < string.length(); i++) {
            char ch = string.charAt(i);
            if(!(ch >= 65 && ch <= 90) && !(ch >= 97 && ch <= 122) && !(ch - '0' >= 0 && ch - '0' <= 9)){
                count ++;
            }
        }
        if(count == 1){
            return 10;
        } else if (count > 1) {
            return 25;
        }else {
            return 0;
        }
    }
}
